package exception;

public class GenericException extends Exception {

    public static class Builder {
        private String message;
        private Throwable cause;
        
        public Builder(String message, Throwable cause) {
            this.message = message;
            this.cause = cause;
        }
        
        public Builder() { 
            
        }
        
        public Builder(String message) {
            this.message = message;
        }
        
        public GenericException build() {
            return new GenericException(this);
        }
        
    }
    
    public GenericException() {
        
    }
    
    private GenericException( Builder builder ) {
        super(builder.message, builder.cause);
    }
    
    /**  Used for serialization */
    private static final long serialVersionUID = -9188364028444504172L;

}
